package com.ruoyi.system.order.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

/**
 * 骑手基本信息表
 * @TableName rider
 */
@TableName(value ="rider")
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class Rider implements Serializable {
    /**
     * 骑手ID
     */
    @TableId(value = "rider_id", type = IdType.AUTO)

    private Long riderId;

    /**
     * 姓名
     */
    private String name;

    /**
     * 手机号
     */
    private String phone;

    /**
     * 工作类型：0-兼职众包，1-全职专送
     */
    private Integer jobType;

    /**
     * 工作地点
     */
    private String workPlace;

    /**
     * 是否实名认证：0-未认证，1-已认证
     */
    private Integer realNameVerified;

    /**
     * 骑手状态：0-未开通 1-接单中 2-休息中
     */
    private Integer auditStatus;

    /**
     * 状态：1-正常 2-停用
     */
    private Integer status;

    /**
     * 注册时间
     */
    private Date joinTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 骑手ID
     */
    public Long getRiderId() {
        return riderId;
    }

    /**
     * 骑手ID
     */
    public void setRiderId(Long riderId) {
        this.riderId = riderId;
    }

    /**
     * 姓名
     */
    public String getName() {
        return name;
    }

    /**
     * 姓名
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 手机号
     */
    public String getPhone() {
        return phone;
    }

    /**
     * 手机号
     */
    public void setPhone(String phone) {
        this.phone = phone;
    }

    /**
     * 工作类型：0-兼职众包，1-全职专送
     */
    public Integer getJobType() {
        return jobType;
    }

    /**
     * 工作类型：0-兼职众包，1-全职专送
     */
    public void setJobType(Integer jobType) {
        this.jobType = jobType;
    }

    /**
     * 工作地点
     */
    public String getWorkPlace() {
        return workPlace;
    }

    /**
     * 工作地点
     */
    public void setWorkPlace(String workPlace) {
        this.workPlace = workPlace;
    }

    /**
     * 是否实名认证：0-未认证，1-已认证
     */
    public Integer getRealNameVerified() {
        return realNameVerified;
    }

    /**
     * 是否实名认证：0-未认证，1-已认证
     */
    public void setRealNameVerified(Integer realNameVerified) {
        this.realNameVerified = realNameVerified;
    }

    /**
     * 骑手状态：0-未开通 1-接单中 2-休息中
     */
    public Integer getAuditStatus() {
        return auditStatus;
    }

    /**
     * 骑手状态：0-未开通 1-接单中 2-休息中
     */
    public void setAuditStatus(Integer auditStatus) {
        this.auditStatus = auditStatus;
    }

    /**
     * 状态：1-正常 2-停用
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 状态：1-正常 2-停用
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 注册时间
     */
    public Date getJoinTime() {
        return joinTime;
    }

    /**
     * 注册时间
     */
    public void setJoinTime(Date joinTime) {
        this.joinTime = joinTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Rider other = (Rider) that;
        return (this.getRiderId() == null ? other.getRiderId() == null : this.getRiderId().equals(other.getRiderId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getJobType() == null ? other.getJobType() == null : this.getJobType().equals(other.getJobType()))
            && (this.getWorkPlace() == null ? other.getWorkPlace() == null : this.getWorkPlace().equals(other.getWorkPlace()))
            && (this.getRealNameVerified() == null ? other.getRealNameVerified() == null : this.getRealNameVerified().equals(other.getRealNameVerified()))
            && (this.getAuditStatus() == null ? other.getAuditStatus() == null : this.getAuditStatus().equals(other.getAuditStatus()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getJoinTime() == null ? other.getJoinTime() == null : this.getJoinTime().equals(other.getJoinTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRiderId() == null) ? 0 : getRiderId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getJobType() == null) ? 0 : getJobType().hashCode());
        result = prime * result + ((getWorkPlace() == null) ? 0 : getWorkPlace().hashCode());
        result = prime * result + ((getRealNameVerified() == null) ? 0 : getRealNameVerified().hashCode());
        result = prime * result + ((getAuditStatus() == null) ? 0 : getAuditStatus().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getJoinTime() == null) ? 0 : getJoinTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", riderId=").append(riderId);
        sb.append(", name=").append(name);
        sb.append(", phone=").append(phone);
        sb.append(", jobType=").append(jobType);
        sb.append(", workPlace=").append(workPlace);
        sb.append(", realNameVerified=").append(realNameVerified);
        sb.append(", auditStatus=").append(auditStatus);
        sb.append(", status=").append(status);
        sb.append(", joinTime=").append(joinTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}